#include"Thread.hpp"

using namespace MyThread;



int main()
{
    thread td([](){
        char name[256];
        pthread_getname_np(pthread_self(),name,sizeof(name));
    });

    //先detach
    //td.Detach();

    //Create

    td.Start();

    //后detach
    //td.Detach();


    sleep(4);
    //Stop
    td.Stop();
    //join
    td.Join();

    std::cout << "新的开始 : 线程互斥!!!\n";
    return 0;
}